package io.renren.modules.bs.service.impl;

import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import io.renren.common.utils.PageUtils;
import io.renren.common.utils.Query;
import io.renren.modules.bs.dao.BsDepartmentPatientImgDao;
import io.renren.modules.bs.entity.BsDepartmentPatientImgEntity;
import io.renren.modules.bs.service.BsDepartmentPatientImgService;
import org.springframework.stereotype.Service;

import java.util.Map;


@Service("bsDepartmentPatientImgService")
public class BsDepartmentPatientImgServiceImpl extends ServiceImpl<BsDepartmentPatientImgDao, BsDepartmentPatientImgEntity> implements BsDepartmentPatientImgService {

    @Override
    public PageUtils queryPage(Map<String, Object> params) {
        QueryWrapper<BsDepartmentPatientImgEntity> imgEntityQueryWrapper = new QueryWrapper<>();
        imgEntityQueryWrapper.eq("department_patient_id",params.get("department_patient_id"));
        IPage<BsDepartmentPatientImgEntity> page = this.page(
                new Query<BsDepartmentPatientImgEntity>().getPage(params),imgEntityQueryWrapper
        );

        return new PageUtils(page);
    }

}